<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<script>
test(() => assert_selection(
    [
        '<div contenteditable><table>',
        '<tr><td>Foo</td><td>baz</td></tr>',
        '<tr><td>bar</td><td>buffalo</td></tr>',
        '</table>|</div>',
    ].join(''),
    'delete',
    [
        '<div contenteditable>^<table><tbody>',
        '<tr><td>Foo</td><td>baz</td></tr>',
        '<tr><td>bar</td><td>buffalo</td></tr>',
        '</tbody></table>|</div>',
    ].join('')),
    'Delete-on-caret selectes TABLE instead of delete something');
</script>
